<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/swiper.css">
    <script src="./js/swiper.js"></script>
</head>

<style>
    .swiper-slide {
      
        height: 100px;
        background: pink;
    }
</style>

<body>

    <div class="swiper">
        <div class="swiper-wrapper">
            <div class="swiper-slide"> Slide1</div>
            <div class="swiper-slide"> Slide2</div>
            <div class="swiper-slide"> Slide3</div>
        </div>
    </div>

    <script>
        var swiper = new Swiper('.swiper', {
            pagination: '.swiper-pagination',
            slidesPerView: 1,
            paginationClickable: true,
            spaceBetween: 30,
            direction:"vertical",
            keyboardControl: true,  //开启键盘控制翻页
            mousewheel: true,
        });

    </script>
</body>

</html>